using NodeCanvas.Variables;

namespace NodeCanvas.Actions
{
	[Name("Set Mecanim Bool")]
	public class MecanimSetBool : MecanimActions
	{
		[RequiredField]
		public string mecanimParameter;

		public BBBool setTo;

		protected override string info
		{
			get
			{
				return "Mec.SetBool '" + mecanimParameter + "' to " + setTo;
			}
		}

		protected override void OnExecute()
		{
			base.animator.SetBool(mecanimParameter, setTo.value);
			EndAction(true);
		}
	}
}
